The present disclosure relates to a communication device and a computer program product. More specifically, the present disclosure relates to a communication device and a computer program product that are capable of measuring an available bandwidth of a communication path between communication devices.
Communication devices are known that can continuously measure the capacity of a transmission path that is available in a communication network (such as the Internet). Hereinafter, a “transmission rate” and the “transmission path capacity” are also referred to as a “bandwidth”. The available transmission path capacity is referred to as an “available bandwidth”. In the known communication devices, a transmission-side communication device (hereinafter referred to as a “transmission device”) that transmits packets for measurement (hereinafter referred to as “measurement packets”) stores, in each of the measurement packets, time information to be used to calculate a transmission interval of the measurement packets. The transmission device transmits the measurement packets, while gradually changing the transmission intervals of the measurement packets and thereby sequentially changing the bandwidths used for transmission within a range of a predetermined bandwidth (hereinafter referred to as a “bandwidth range”). A receiving-side communication device (hereinafter referred to as a “reception device”) stores reception intervals of the measurement packets. The reception device calculates a difference between each of the transmission intervals included in the time information in the measurement packets and each of the reception intervals stored in the reception device. The available bandwidth is identified from the tendency of change in values of the calculated plurality of differences. The identified available bandwidth is notified to the transmission device. The transmission device acquires the available bandwidth. The above-described processing is repeatedly performed by the transmission device transmitting the measurement packets while changing the bandwidth range. By doing this, the bandwidth that is available between the communication devices is continuously measured. The bandwidth range is determined such that the available bandwidth identified at the previous measurement time is equal to an average value (a median value of the narrowest bandwidth and the widest bandwidth in the bandwidth range) in the bandwidth range at the current measurement time.
Data such as audio data and video data attributable to an application desired by a user (hereinafter referred to as “desired data”) is stored in the measurement packets. Thus, the communication device can perform communication of the desired data between the communication devices, while measuring the available bandwidth of the communication path. It is therefore possible to efficiently perform communication of the desired data.